﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Scheduling.Models.Interfaces
{
    public interface IBookingLoader
    {
        /// <summary>
        /// Retrieve all bookings from the database. 
        /// </summary>
        /// <returns>List of requested bookings. </returns>
        List<Booking> GetBookings();

        /// <summary>
        /// Retrieve a single booking from the database. 
        /// </summary>
        /// <returns>The requested booking. </returns>
        Booking GetBooking(int BookingID);

        /// <summary>
        /// Retrieve the bookings booked by a certain user. 
        /// </summary>
        /// <param name="UserID">ID of the user. </param>
        /// <returns>List of bookings. </returns>
        List<Booking> GetBookingsByUserID(string UserID);

        /// <summary>
        /// Retrieves which bookings the specified booking collides with. 
        /// </summary>
        /// <param name="Booking"></param>
        /// <returns></returns>
        List<Booking> GetCollisions(Booking Booking);

        List<Booking> GetBookingsByCourseInstanceID(int CourseInstanceID);


        List<Booking> GetBookingByCourseID(string CourseID);




        /// <summary>
        /// Deletes a booking from the database. 
        /// </summary>
        /// <param name="BookingID">The ID of the booking to be deleted. </param>
        void DeleteBooking(int BookingID);

        /// <summary>
        /// Inserts a booking into the database. 
        /// </summary>
        /// <param name="Booking">The booking to insert, value of indices are ignored. </param>
        void InsertBooking(Booking Booking);

        void EditBooking(Booking Booking);


        /// <summary>
        /// Delete all bookings  
        /// </summary>
        void Clear();
    }
}